<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>div和span</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            margin: 10px;
            padding: 10px;
            background-color: lightblue;
        }
        span{
            height: 200px;
            width: 200px;
            /*background-color: lightgreen;*/
            margin: 10px;
            padding: 10px;
        }
        b{
            display: inline-block;
            width: 200px;
            height: 200px;
            background-color: lightgreen;
        }
    </style>
</head>
<body>
<!--块元素：div h1-h6 ul>li ol>li dl>dt/dd p pre
    ES5新特性：header footer
    1.宽度100%,独占一行 宽度由子元素决定
    2.可以指定宽高，设置左右的margin padding
-->
<div>
    块元素
    <span>行内元素</span>
    <span>行内元素</span>
    <span>行内元素</span>
    <span>行内元素</span>
</div>
<!--行元素
     span a b img
     不可以设置宽高
     宽高由元素内容决定
     可以与其他行内元素共享一行
     行内元素不可进行嵌套
     可以指定宽高，设置上下左右的margin padding
-->
<!--<img src="https://img2.baidu.com/it/u=4151737570,2412164329&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500"-->
<!--     alt="无法加载图片" height="200px" width="200px">-->
<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F2079b7fd-4f4a-4f48-8e0d-507092dda937%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1707488025&t=50387d9a7bfa389d5e0259822786141b"
     alt="无法加载图片" height="200px" width="200px">
<span>行内元素</span>
<span>行内元素</span>
<span>行内元素</span>
<span>行内元素</span>
<b>b标签</b><b>b标签</b>
</body>
</html>